
<center>
    <p>FreeWallet is a free wallet which supports Bitcoin and Counterparty.</p>
    <a href="https://freewallet.io"><img src="images/logo.png" height="100" style="margin-bottom: 5px"></a>
    <div id="fw_version"></div>
    <hr size=1 class="spacer">
    <p>Freewallet uses public APIs available from the following providers:</p>
    <div>
        <a target="_blank" href="https://tokenscan.io"><img class="about-logo" src="images/tokenscan-color-500.png"></a>
        <a target="_blank" href="https://coindaddy.io"><img class="about-logo" src="images/coindaddy-500.jpg"></a>
        <a target="_blank" href="https://chain.so"><img class="about-logo" src="images/sochain-logo.png"></a>
        <br>
        <a target="_blank" href="https://blockcypher.com"><img class="about-logo" src="images/blockcypher-500.jpg"></a>
        <a target="_blank" href="https://blockstream.info"><img class="about-logo" src="images/blockstream-500.jpg"></a>

    </div>
    <br>
    <div class="alert alert-info">
        FreeWallet includes an <i>optional</i> 'Automatic Donation System'<br> 
        You can edit your automatic donation preferences at Settings->Preferences<br>
        <i class="fa fa-heart"></i> All donations are appreciated and support hosting and additional development <i class="fa fa-heart"></i>
    </div>
    <!--
    <p align="justify">If you would like to support continued development of FreeWallet and continued hosting of the XChain.io counterparty block explorer, please consider making a donation using the 'Donate' button below, or purchase a FULLACCESS token using the button below.</p>
    -->
</center>

<style>
img.about-logo {
    height: 40px;
    margin-left: 5px;
    margin-right: 5px;
}
hr.spacer {
    margin-top: 5px;
    margin-bottom: 5px;
}
</style>

<div class="text-right">
    <div id="btn-debug" class="btn btn-info pull-left"><i class="fa fa-lg fa-fw fa-bug"></i> Debug</div>
    <div id="btn-update" class="btn btn-primary pull-left" style="margin-left: 5px"><i class="fa fa-lg fa-fw fa-download"></i> Check for Update</div>
    <div id="btn-license" class="btn btn-info pull-left" style="margin-left: 5px"><i class="fa fa-lg fa-fw fa-info-circle"></i> License Agreement</div>
    <!-- <div id="btn-buy" class="btn btn-success"><i class="fa fa-lg fa-fw fa-btc"></i> Buy FULLACCESS</div> -->
    <div id="btn-donate" class="btn btn-info"><i class="fa fa-lg fa-fw fa-bitcoin"></i> Donate</div>
</div>

<script>
$(document).ready(function(){

    // Define donation address
    var address = '1FWDonkMbC6hL64JiysuggHnUAw2CKWszs',
        debug   = $('#btn-debug'),
        update  = $('#btn-update'),
        version = (is_nwjs()) ? 'Version ' + nw.App.manifest.version : 'Development Build';

    // Display current version number
    $('#fw_version').html(version);

    // Handle showing/hiding the debug button
    if(is_nwjs()){
        debug.click($.debounce(100,function(e){
            nw.Window.get().showDevTools();
        }));
        update.click($.debounce(100,function(e){
            checkWalletUpgrade(version, true);
        }));
    } else {
        debug.hide();
        update.hide();
    }

    // When a user clicks the License Agreement button, display the license agreement
    $('#btn-license').click(function(){
        dialogLicenseAgreement(true);
    });

    // When a user clicks the donate now button, save bounty address and launch 'Send Funds' window
    $('#btn-donate').click($.debounce(100, function(e){
        FW.DIALOG_DATA = {
            destination: address
        };
        dialogSend();
        dialogClose('dialog-about');
    }));

    // When a user clicks 'Buy FULLACCESS' button, throw dispenser buy dialog to purchase from official dispenser
    $('#btn-buy').click($.debounce(100, function(e){
        FW.DIALOG_DATA = {
            name: 'FULLACCESS',
            asset: 'FULLACCESS',
            give_quantity: '1',
            give_remaining: '10', // Prevent people from buying more than 10
            satoshirate: '0.00200000',
            destination: 'bc1q50kxp76j9l0k9jgwasvcz4mcz0v03fv2y5pdxx'
        };
        dialogDispenserBuy();
    }));


    // Hide the send form if users clicks 'cancel' button
    $('#btn-ok').click($.debounce(100,function(e){
        dialogClose('dialog-about');
    }));

});
</script>